# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AccessContextManager.V1.Model.ScopedAccessSettings do
  @moduledoc """
  A relationship between access settings and its scope.

  ## Attributes

  *   `activeSettings` (*type:* `GoogleApi.AccessContextManager.V1.Model.AccessSettings.t`, *default:* `nil`) - Optional. Access settings for this scoped access settings. This field may be empty if dry_run_settings is set.
  *   `dryRunSettings` (*type:* `GoogleApi.AccessContextManager.V1.Model.AccessSettings.t`, *default:* `nil`) - Optional. Dry-run access settings for this scoped access settings. This field may be empty if active_settings is set.
  *   `scope` (*type:* `GoogleApi.AccessContextManager.V1.Model.AccessScope.t`, *default:* `nil`) - Optional. Application, etc. to which the access settings will be applied to. Implicitly, this is the scoped access settings key; as such, it must be unique and non-empty.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :activeSettings => GoogleApi.AccessContextManager.V1.Model.AccessSettings.t() | nil,
          :dryRunSettings => GoogleApi.AccessContextManager.V1.Model.AccessSettings.t() | nil,
          :scope => GoogleApi.AccessContextManager.V1.Model.AccessScope.t() | nil
        }

  field(:activeSettings, as: GoogleApi.AccessContextManager.V1.Model.AccessSettings)
  field(:dryRunSettings, as: GoogleApi.AccessContextManager.V1.Model.AccessSettings)
  field(:scope, as: GoogleApi.AccessContextManager.V1.Model.AccessScope)
end

defimpl Poison.Decoder, for: GoogleApi.AccessContextManager.V1.Model.ScopedAccessSettings do
  def decode(value, options) do
    GoogleApi.AccessContextManager.V1.Model.ScopedAccessSettings.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AccessContextManager.V1.Model.ScopedAccessSettings do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
